/**++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**
 *  @author     Andrew Wei
 *  @portfolio  http://andrewwei.mu
 *
 *  ©2012 Andrew Wei
 *
 *  This software is released under the MIT License:
 *  http://www.opensource.org/licenses/mit-license.php
 **++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++**/
package com.ghoztudios.events
{
    /// @eventType  flash.events.ViewEvent.ENTER_COMPLETE
    [Event(name = "enterComplete", type = "flash.events.ViewEvent")]

    /// @eventType  flash.events.ViewEvent.EXIT_COMPLETE
    [Event(name = "exitComplete", type = "flash.events.ViewEvent")]

    /// @eventType  flash.events.ViewEvent.SUBVIEW_CHANGE
    [Event(name = "subviewChange", type = "flash.events.ViewEvent")]

    /// @eventType  flash.events.ViewEvent.SUBVIEW_LOAD_COMPLETE
    [Event(name = "subviewLoadComplete", type = "flash.events.ViewEvent")]


    /**
     * An event class for handling View events.
     *
     * @langversion     3.0
     * @playerversion   Flash 10.3.183.20
     */
    public class ViewEvent extends EnhancedEvent
    {
        private static const ID:String = 'com.ghoztudios.events.ViewEvent';


        // Events
        /**
         * Defines the value of the type property of a ViewEvent object.
         * This event is dispatched when the View is finished transitioning in.
         *
         * @langversion     3.0
         * @playerversion   Flash 10.3.183.20
         */
        public static const ENTER_COMPLETE:String = "enterComplete";

        /**
         * Defines the value of the type property of a ViewEvent object.
         * This event is dispatched when the View is finished transitioning out.
         *
         * @langversion     3.0
         * @playerversion   Flash 10.3.183.20
         */
        public static const EXIT_COMPLETE:String = "exitComplete";

        /**
         * Defines the value of the type property of a ViewEvent object.
         * This event is dispatched whenever there is a subview change.
         *
         * @langversion     3.0
         * @playerversion   Flash 10.3.183.20
         */
        public static const SUBVIEW_CHANGE:String = "subviewChange";

        /**
         * Defines the value of the type property of a ViewEvent object.
         * This event is dispatched whenever a subview is finished loading.
         *
         * @langversion     3.0
         * @playerversion   Flash 10.3.183.20
         */
        public static const SUBVIEW_LOAD_COMPLETE:String = "subviewLoadComplete";


        // Initialization
        /**
         * Creates a new ViewEvent instance.
         *
         * @param   $type
         * @param   $data
         * @param   $bubbles
         * @param   $cancelable
         * @langversion     3.0
         * @playerversion   Flash 10.3.183.20
         */
        public function ViewEvent($type:String, $data:Object = null, $bubbles:Boolean = false, $cancelable:Boolean = false):void
        {
            super($type, $data, $bubbles, $cancelable);
        }
    }
}
